<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//无需认证的路由
Route::group(['prefix' => 'v1','namespace'=>'Api'], function() {
    Route::post('User/login', 'UserController@login');
    Route::post('User/register', 'UserController@register');
});

//需认证的路由
Route::group(['prefix' => 'v1','namespace'=>'Api','middleware' => 'auth:api'], function(){
    Route::get('User/get', 'UserController@get');
});
